import request from '@/utils/request'

const BASE_URL = process.env.VUE_APP_BASE_URL

//菜单管理
export function getMenuList() {
  return request({
    url: `${BASE_URL}/web/v1/menu/menuList`,
    method: 'get'
  })
}
//菜单详情
export function getMenuDetail(id) {
  return request({
    url: `${BASE_URL}/web/v1/menu/menuDetail/`+id,
    method: 'get',
  })
}
//新增菜单
export function addMenu(data) {
  return request({
    url: `${BASE_URL}/web/v1/menu/addMenu`,
    method: 'post',
    data
  })
}
//修改菜单
export function updateMenu(data) {
  return request({
    url: `${BASE_URL}/web/v1/menu/updMenu`,
    method: 'post',
    data
  })
}
//菜单删除
export function deleteResource(data) {
  return request({
    url: `${BASE_URL}/web/v1/menu/deleteMenu`,
    method: 'post',
    data
  })
}
